package cn.lizemin.template.version1.entity;

import cn.lizemin.template.version1.Transport;

/**
 * @author lzm
 * @version 1.0
 * @description: 使用回调来实现模板方法
 * @date 2022/4/20 10:44
 */
public class People{

    public void toCompany(Transport transport) {
        openEyes();
        getup();
        transport.takingTransport();
        arrive();
    }

    private void arrive() {
        System.out.println("到达公司。。。");
    }

    private void getup() {
        System.out.println("起床。。。");
    }

    private void openEyes() {
        System.out.println("睁开眼。。。");
    }

}
